import { defineStore } from 'pinia';

export const usechannelStore = defineStore('channel', {
    state: () => ({
        loadding: false,
        form: null,
        list: null,
        channelid: null,
        name: null,
        showform: false,
        isselect: false,
    }),
    actions: {
        setnull() {
            this.loadding=false,
            this.form=null,
            this.list= null,
            this.channelid= null,
            this.name= null,
            this.showform= false,
            this.isselect= false
        },
        setloadding(loadding) {
            this.loadding = loadding;
        },
        setform(form) {
            this.form = form;
        },
        setlist(list) {
            this.list = list;
        },
        setid(channelid) {
            this.channelid = channelid;
        },
        setname(name) {
            this.name = name;
        },
        setshowform(showform) {
            this.showform = showform;
        },
        setselect(select) {
            this.isselect = select;
        },
    }
});
